<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0" />
    <title>美策平台</title>
    <link rel="icon" type="image/png" href="/img/icon.png">
    <link rel="stylesheet" type="text/css" href="../datepicker/jquery-ui.min.css">
    <link rel="stylesheet" type="text/css" href="../css/app.css">
    <link rel="stylesheet" type="text/css" href="../css/orderGrad.css">
    <script type="text/javascript" src="../js/jquery.min.js"></script>
    <script type="text/javascript" src="/h5/js/all.js"></script>
    <script type="text/javascript" src="../js/getPageId.js"></script>
</head>
<body>
    <div class="shippingTransportation orderProductionDocumentary">
        <div class="orderParamTitle">
            发货运输
            <img src="../images/return.png" class="orderRtns" onclick="history.go(-1)">
        </div>
        <div style="height:1.066667rem"></div>
        <div class="content">
            <div class="address">
                <div class="ad1">
                    <div>出发地</div>
                    <div>杭州</div>
                </div>
                <div class="img"><img src="../images/order/jiantou.png" alt=""></div>
                <div class="ad2">
                    <div>目的地</div>
                    <div>上海</div>
                </div>
            </div>
            <div class="orderCotent">
                <p>订单详情</p>
                <ul></ul>
            </div>
        </div>
        <div class="orderDown">
            <div onclick="window.location.href='shippingTransportation2.html?id='+pageId">下一步</div>
        </div>
    </div>

    <script type="text/javascript" src="../js/app.js"></script>
    <script type="text/javascript" src="../js/orderPageChange.js"></script>
    <script type="text/javascript" src="../js/order.js"></script>
    <script type="text/javascript" src="../js/alertMsg.js"></script>
<script>
    $(function() {
        var id = localStorage.getItem('orderShowId');
        var userInfo = JSON.parse(localStorage.getItem('userInfo'));
        var app_access = userInfo.app_access;
        var token = userInfo.token;
        console.log(id)
        var orderShow = {
            getOrderId: function() {
                var data = {
                    id: pageId,
                    app_access: app_access,
                    token: token
                }
                $.ajax({
                    url: '/api/order/my/detail',
                    data: data,
                    type: 'get',
                    dataType: 'json',
                    success: function(res) {
                        console.log(res)
                        if (res.code != 200) {
                            alertMsg(res.msg)
                        } else {
                            var shippingTransportationHtml = '<li>'+
                                                            '<div>中单企业</div>'+
                                                            '<div>'+res.data.com_name+'</div>'+
                                                        '</li>'+
                                                        '<li>'+
                                                            '<div>企业地址</div>'+
                                                            '<div>'+res.data.com_address+'</div>'+
                                                        '</li>'+
                                                        '<li>'+
                                                            '<div>负责人</div>'+
                                                            '<div>'+res.data.legal_name+'</div>'+
                                                        '</li>'+
                                                        '<li>'+
                                                            '<div>联系方式</div>'+
                                                            '<div>'+res.data.legal_mobile+'</div>'+
                                                        '</li>'+
                                                        '<li>'+
                                                            '<div>订单数量</div>'+
                                                            '<div>'+res.data.money+'</div>'+
                                                        '</li>'+
                                                        '<li>'+
                                                            '<div>订单金额</div>'+
                                                            '<div>'+res.data.all_money+'</div>'+
                                                        '</li>'+
                                                        '<li>'+
                                                            '<div>订单总价</div>'+
                                                            '<div>'+res.data.num+'</div>'+
                                                        '</li>'+
                                                        '<li>'+
                                                            '<div>厂家备注</div>'+
                                                            '<div>'+res.data.note+'</div>'+
                                                        '</li>'+
                                                        '<li>'+
                                                            '<div>下单时间</div>'+
                                                            '<div>'+res.data.created_at+'</div>'+
                                                        '</li>'+
                                                        '<li>'+
                                                            '<div>快递运单</div>'+
                                                            '<div>'+res.data.kd_code+'</div>'+
                                                        '</li>'+
                                                        '<li>'+
                                                            '<div>快递类型</div>'+
                                                            '<div>'+res.data.kd_name+'</div>'+
                                                        '</li>'+
                                                        '<li>'+
                                                            '<div>生产进度</div>'+
                                                            '<div>'+res.data.status+'</div>'+
                                                        '</li>'+
                                                        '<li class="custom">'+
                                                            '<div>自定义属性</div>'+
                                                            '<div>自定义内容</div>'+
                                                        '</li>'
                        
                        $('.orderCotent ul').html(shippingTransportationHtml)
                        }
                    },
                    err: function(err) {
                        alertMsg(err)
                    }
                })
            }
        }
       
        orderShow.getOrderId()
    })
</script>
</body>
</html>